import axios from 'axios'
import store from '@/store'

const request = axios.create({
  baseURL: 'http://liufusong.top:8080'
})

request.interceptors.request.use((config) => {
  if (store.state.userToken) {
    config.headers.Authorization = store.state.userToken
  }

  return config
})

export default request
